Doppler effect

A sound source is moving with velocity v along the horizontal axis. Every period T a wave front leaves the source and travels with velocity c with respect to a medium (say air), which may be still or move with velocity (Vx, Vy) = (Vx, Vy). A detector is located at position (x, y) and may move with velocity (dx/dt, dy/dt). In the graphics window below the animation a vertical red (green) bar is displayed each time a wave front leaves the source (reaches the detector).